package com.wlyuan.open.dto.transport;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author lijing
 * @description
 */
@Data
public class TransportAddressDTO implements Serializable {

    private static final long serialVersionUID = -8572640365849901212L;
    @ApiModelProperty("省")
    private String province;

    @ApiModelProperty("市")
    private String city;

    @ApiModelProperty("区")
    private String district;

    @ApiModelProperty("省编码")
    private String provinceCode;

    @ApiModelProperty("市编码")
    private String cityCode;

    @ApiModelProperty("区编码")
    private String districtCode;

    @ApiModelProperty("地址")
    private String address;

    @ApiModelProperty("经纬度")
    private String location;

    @NotNull(message = "精确度不能为空")
    @Range(min = 0, max = 1, message = "精确度不正确")
    @ApiModelProperty(value = "精确度", required = true, allowableValues = "0,1")
    private Integer precision;

    @NotBlank(message = "联系人不能为空")
    @Length(max = 20, message = "联系人最多可输入20个字符")
    @ApiModelProperty(value = "联系人", required = true)
    private String contactName;

    @NotBlank(message = "联系电话不能为空")
    @Length(max = 50, message = "联系电话最多可输入50个字符")
    @ApiModelProperty(value = "联系电话", required = true)
    private String contactMobile;
}
